<%@tag import="com.winexpress.util.SessionAttributes"%>
<link href="/WineXpressClient/resources/css/bootstrap.css" rel="stylesheet"/>
<link href="/WineXpressClient/resources/css/modern-business.css" rel="stylesheet"/>
<link href="/WineXpressClient/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="/WineXpressClient/resources/js/bootstrap.js"></script>
<script src="/WineXpressClient/resources/js/modern-business.js"></script>
<script src="/WineXpressClient/resources/js/bootstrapValidator.js"></script>

<div id="top">
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/WineXpressClient/initialization/index">WineXpress</a>
            </div>

            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="/WineXpressClient/searchManagement/shop">Shop</a>
                    </li>
                    <li><a href="/WineXpressClient/common/contactPage">Contact</a>
                    </li>
                    <%if (session.getAttribute(SessionAttributes.USER_ID) != null && !(Boolean) session.getAttribute(SessionAttributes.IS_ADMIN)) { %>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Order / Account<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li class="dropdown-header">Order Management</li>
                            <li><a href="/WineXpressClient/historyOrder/viewHistoryOrder" target="_blank">View Order History</a></li>
                            <li class="divider"></li>
                            <li class="dropdown-header">Account Management</li>
                            <li><a href="/WineXpressClient/accountManagement/customerParticularResult">View Account Information</a></li>
                            <li><a href="/WineXpressClient/customer/customerPaticular.jsp">Edit Particulars</a></li>
                            <li><a href="/WineXpressClient/common/changePassword">Change Password</a></li>
                            <li class="divider"></li>
                            <li class="dropdown-header">Enquiry</li>
                            <li><a href="/WineXpressClient/common/submitEnquiry">Create Enquiry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li> 
                            <li><a href="/WineXpressClient/enquiryManagement/customerViewEnquiryPending">View Pending Enquiry</a></li> 
                            <li><a href="/WineXpressClient/enquiryManagement/customerViewEnquiry">View Responded Enquiry</a></li> 
                        </ul>
                    </li>
                    <% }%>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Shopping Cart(<%=request.getAttribute("itemsnum")%>)<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="/WineXpressClient/cart/viewCart">View Shopping Cart</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Other Pages <b class="caret"></b></a>
                        <ul class="dropdown-menu">                           

                            <li><a href="/WineXpressClient/common/adminSignIn">Staff Sign in</a></li>
                        </ul>
                    </li>
                    <% if (session.getAttribute(SessionAttributes.USER_ID) != null) {%>
                    <div class="navbar-form navbar-right">
                        <a href="/WineXpressClient/accountManagement/customerParticularResult" ><%= session.getAttribute(SessionAttributes.USER_FIRST_NAME)%></a>
                        &nbsp;&nbsp;
                        <a href="/WineXpressClient/logout/index" class="btn btn-success" role="button">Sign out</a>
                    </div>
                    <% } else {%>
                    <div class="navbar-form navbar-right">
                        <button class="btn btn-primary" data-toggle="modal" data-target="#login">Sign in</button>
                        <a href="/WineXpressClient/register.jsp" class="btn btn-success" role="button">Register</a>
                        <a href="/WineXpressClient/facebookSignin" ><img src="/WineXpressClient/resources/images/facebook.png" alt="Facebook"/></a>
                        <a href="/WineXpressClient/googleSignIn" ><img <img src="https://www.gstatic.com/images/icons/gplus-32.png" alt="Google"/></a>
                    </div>
                    <% }%>
                </ul>
            </div>
        </div>
    </nav>
    <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">Login</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form" action="/WineXpressClient/login/index" method="POST">
                        <div class="form-group">
                            <label for="inputEmail" class="col-sm-2 control-label">Email</label>
                            <div class="col-sm-10">
                                <input type="email" class="form-control" name="inputEmail" placeholder="Email">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword" class="col-sm-2 control-label">Password</label>
                            <div class="col-sm-10">
                                <input type="password" class="form-control" name="inputPassword" placeholder="Password">
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-4 control-label"> </label>
                            <div class="col-sm-10" style="padding-left: 115px;">
                                <a href="/WineXpressClient/forgetPassword.jsp">Forget Password</a>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default">Sign in</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
